<!--Begin All-->
    <div class="d_all">
    	
		<!--Menu-->
                    <div class="tt_menu_2">
                    	<div class="pl20 pt10">
                            <?php echo $this->ProductCat(); ?>
                         </div>
                            <?php echo $this->render('/search_product.phtml'); ?>
                    </div>
                    
        <!--End Menu-->
    
    <!--Begin Contents-->
    <div class="d_contents_wrap_2">
    	<div class="d_space_height_10"></div>
		
        <!-- Left -->
        <div class="dd_ctsp">
        
        <div class="ttct_top">
            <div class="pl20"><?php echo $this->cat_name; ?></div>
        </div>
        
        <div class="dd_ctsp_mid">
            <div class="pa20">
                <?php 
                    if(count($this->data) > 0) :
                    $product = new Default_Model_Product();
                    foreach($this->data as $value) : 
                    $percent = 100 - (($value['sales_price'] / $value['original_price']) * 100);
                ?>
                         <div class="product">
                                    <a href="<?php echo $this->baseUrl('product/details?id=') . $value['product_id']; ?>" class="product_title"><?php echo $value['sort_name']; ?></a>
                                    
                                    <div class="product_image">
                                        <a href="<?php echo $this->baseUrl('product/details?id=') . $value['product_id']; ?>"><img src="<?php echo $this->baseUrl('/public/files/product/') . $value['product_image']; ?>" /></a>
                                        <div class="percent">
                                            <p><?php echo $product->percent($percent); ?></p>
                                            <span class="mini_percent">%</span>
                                        </div>
                                    </div>
                                    
                                    <div class="original_price"><strike><?php echo $product->formatMoney($value['original_price']); ?>đ</strike></div>
                                    
                                    <div class="sales_price"><?php echo $product->formatMoney($value['sales_price']); ?>đ</div>
                                    
                                    <div class="row3">
                                        <div class="area_name"><?php echo $value['area_name']; ?></div>
                                    </div>
                                    
                                    <div class="provider_icon"><img src="<?php echo $this->baseUrl('/public/files/provider/') . $value['provider_icon']; ?>" /></div>
                                    
                                    <p class="provider_name"><?php echo $value['provider_name']; ?></p>
                         </div>
                                <?php 
                    endforeach; 
                    endif;
                ?>
                <div class="pagination">
                    <?php 
                        $currentUrl = '?id=' . $this->cat_id;
                        echo $this->paginationControl($this->data, 'Sliding', 'product/pagination.phtml', array('currentUrl' => $currentUrl)); 
                    ?>
                </div>
            </div>
        </div>
        
        <!-- End Kênh tin -->
        <div class="dd_ctsp_bot"></div>	

        </div>
        <!-- End Left -->    